-- GENERATED SPELL FOR [Skeletal Acolyte] --


function spell0_1789(pUnit, Event) --@Dark Mending,Heal--
pUnit:FullCastSpellOnTarget(16588,pUnit)
pUnit:RegisterEvent('Sorts_1789', 3500, 1)
end

function spell1_1789(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1789', 3000, 1)
end

function spell2_1789(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(14887,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1789', 3000, 1)
end

function Sorts_1789(pUnit, Event)
local choix_sorts_1789 = math.random(0, 2)
if choix_sorts_1789 == 0 then
pUnit:RegisterEvent('spell0_1789', 1, 1)
end
if choix_sorts_1789 == 1 then
pUnit:RegisterEvent('spell1_1789', 1, 1)
end
if choix_sorts_1789 == 2 then
pUnit:RegisterEvent('spell2_1789', 1, 1)
end
end

function mob1789_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1789', math.random(1500, 3000), 1)
end

function mob1789_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1789_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1789_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1789, 1, 'mob1789_Action')
RegisterUnitEvent(1789, 2, 'mob1789_Leave')
RegisterUnitEvent(1789, 3, 'mob1789_Kill')
RegisterUnitEvent(1789, 4, 'mob1789_Die')
